package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type AlibabaServicecenterFulfiltaskQueryRequest struct {
	/*
	   时间段查询，核销单创建时间，时间段跨度不超过15分钟     */
	GmtCreateStart *util.LocalTime `json:"gmt_create_start,omitempty" required:"false" `
	/*
	   每页条数，默认50，最大50 defalutValue��50    */
	PageSize *int64 `json:"page_size,omitempty" required:"false" `
	/*
	   核销单外部单号     */
	OuterId *string `json:"outer_id,omitempty" required:"false" `
	/*
	   时间段查询，核销单创建时间，时间段跨度不超过15分钟     */
	GmtCreateEnd *util.LocalTime `json:"gmt_create_end,omitempty" required:"false" `
	/*
	   查询第几页 defalutValue��1    */
	CurrentPage *int64 `json:"current_page,omitempty" required:"false" `
	/*
	   核销单id列表     */
	FulfilTaskIdList *[]int64 `json:"fulfil_task_id_list,omitempty" required:"false" `
}

func (s *AlibabaServicecenterFulfiltaskQueryRequest) SetGmtCreateStart(v util.LocalTime) *AlibabaServicecenterFulfiltaskQueryRequest {
	s.GmtCreateStart = &v
	return s
}
func (s *AlibabaServicecenterFulfiltaskQueryRequest) SetPageSize(v int64) *AlibabaServicecenterFulfiltaskQueryRequest {
	s.PageSize = &v
	return s
}
func (s *AlibabaServicecenterFulfiltaskQueryRequest) SetOuterId(v string) *AlibabaServicecenterFulfiltaskQueryRequest {
	s.OuterId = &v
	return s
}
func (s *AlibabaServicecenterFulfiltaskQueryRequest) SetGmtCreateEnd(v util.LocalTime) *AlibabaServicecenterFulfiltaskQueryRequest {
	s.GmtCreateEnd = &v
	return s
}
func (s *AlibabaServicecenterFulfiltaskQueryRequest) SetCurrentPage(v int64) *AlibabaServicecenterFulfiltaskQueryRequest {
	s.CurrentPage = &v
	return s
}
func (s *AlibabaServicecenterFulfiltaskQueryRequest) SetFulfilTaskIdList(v []int64) *AlibabaServicecenterFulfiltaskQueryRequest {
	s.FulfilTaskIdList = &v
	return s
}

func (req *AlibabaServicecenterFulfiltaskQueryRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.GmtCreateStart != nil {
		paramMap["gmt_create_start"] = *req.GmtCreateStart
	}
	if req.PageSize != nil {
		paramMap["page_size"] = *req.PageSize
	}
	if req.OuterId != nil {
		paramMap["outer_id"] = *req.OuterId
	}
	if req.GmtCreateEnd != nil {
		paramMap["gmt_create_end"] = *req.GmtCreateEnd
	}
	if req.CurrentPage != nil {
		paramMap["current_page"] = *req.CurrentPage
	}
	if req.FulfilTaskIdList != nil {
		paramMap["fulfil_task_id_list"] = util.ConvertBasicList(*req.FulfilTaskIdList)
	}
	return paramMap
}

func (req *AlibabaServicecenterFulfiltaskQueryRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
